home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 March / PCWMAR09.iso / Software / Freeware / Adobe Media Player 1.6 / adobe_media_player.air / AMP.swf / scripts / _WindowStyle.as < prev    next >
Encoding:
Text File  |  2008-11-25  |  2.4 KB  |  65 lines

  1. package
  2. {
  3.    import mx.core.IFlexModuleFactory;
  4.    import mx.skins.halo.ApplicationTitleBarBackgroundSkin;
  5.    import mx.skins.halo.StatusBarBackgroundSkin;
  6.    import mx.skins.halo.WindowBackground;
  7.    import mx.skins.halo.WindowCloseButtonSkin;
  8.    import mx.skins.halo.WindowMaximizeButtonSkin;
  9.    import mx.skins.halo.WindowMinimizeButtonSkin;
  10.    import mx.skins.halo.WindowRestoreButtonSkin;
  11.    import mx.styles.CSSStyleDeclaration;
  12.    import mx.styles.StyleManager;
  13.    
  14.    public class _WindowStyle
  15.    {
  16.       public function _WindowStyle()
  17.       {
  18.          super();
  19.       }
  20.       
  21.       public static function init(param1:IFlexModuleFactory) : void
  22.       {
  23.          var fbs:IFlexModuleFactory = param1;
  24.          var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("Window");
  25.          if(!style)
  26.          {
  27.             style = new CSSStyleDeclaration();
  28.             StyleManager.setStyleDeclaration("Window",style,false);
  29.          }
  30.          if(style.defaultFactory == null)
  31.          {
  32.             style.defaultFactory = function():void
  33.             {
  34.                this.statusTextStyleName = "statusTextStyle";
  35.                this.minimizeButtonSkin = WindowMinimizeButtonSkin;
  36.                this.gripperPadding = 3;
  37.                this.borderStyle = "solid";
  38.                this.restoreButtonSkin = WindowRestoreButtonSkin;
  39.                this.closeButtonSkin = WindowCloseButtonSkin;
  40.                this.highlightAlphas = [1,1];
  41.                this.cornerRadius = 8;
  42.                this.titleBarBackgroundSkin = ApplicationTitleBarBackgroundSkin;
  43.                this.backgroundImage = WindowBackground;
  44.                this.borderThickness = 1;
  45.                this.buttonPadding = 2;
  46.                this.statusBarBackgroundColor = 13421772;
  47.                this.titleBarButtonPadding = 5;
  48.                this.buttonAlignment = "auto";
  49.                this.titleTextStyleName = "titleTextStyle";
  50.                this.borderColor = 10921638;
  51.                this.roundedBottomCorners = false;
  52.                this.titleAlignment = "auto";
  53.                this.showFlexChrome = true;
  54.                this.titleBarColors = [16777215,12237498];
  55.                this.gripperStyleName = "gripperSkin";
  56.                this.maximizeButtonSkin = WindowMaximizeButtonSkin;
  57.                this.backgroundColor = 12632256;
  58.                this.statusBarBackgroundSkin = StatusBarBackgroundSkin;
  59.             };
  60.          }
  61.       }
  62.    }
  63. }
  64.  
  65.